package com.example.orderminiappapi.service.Impl;

import com.example.orderminiappapi.bean.Notice;
import com.example.orderminiappapi.bean.SearchCondition;
import com.example.orderminiappapi.bean.Shop;
import com.example.orderminiappapi.dao.NoticeDao;
import com.example.orderminiappapi.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    private NoticeDao noticeDao;

    @Override
    public int addNotice(Notice notice) {
        return noticeDao.addNotice(notice);
    }

    @Override
    public List<Notice> getUnreadNotice(Shop shop) {
        return noticeDao.getUnreadNotice(shop);
    }

    @Override
    public List<Notice> getAllNotice(SearchCondition searchCondition) {
        return noticeDao.getAllNotice(searchCondition);
    }

    @Override
    public int getNoticeCount(SearchCondition searchCondition) {
        return noticeDao.getNoticeCount(searchCondition);
    }

    @Override
    public int readAllNotice(Shop shop) {
        return noticeDao.readAllNotice(shop);
    }
}
